<?php

namespace App\Providers;

use Illuminate\Support\Facades\DB;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
         $siteBaseConfig = DB::table('siteconfig')->select('sitename','sitetitle','siteurl','titleattach','metakeyword','metadesp')->get();
         view()->share('sitename',$siteBaseConfig[0]['sitename']);
         view()->share('sitetitle',$siteBaseConfig[0]['sitetitle']);
         view()->share('titleattach',$siteBaseConfig[0]['titleattach']);
         view()->share('metakeyword',$siteBaseConfig[0]['metakeyword']);
         view()->share('metadesp',$siteBaseConfig[0]['metadesp']);
         view()->share('siteurl',$siteBaseConfig[0]['siteurl']);
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
